/*
 * Copyright (C) ${year} Jeffrey Palm.
 *
 * This code is part of the Floto Project (http://jeffpalm.com/floto/).
 * Please consult the LICENSE included in the distribution.
 */
package com.jeffpalm.floto.isight;

import java.io.IOException;
import java.net.MalformedURLException;

/**
 * Implementations of this interface will take a URL, array of parameters and
 * return a result, so we can mock out the Rails server.
 */
interface URLRequester {
  /**
   * Make a <code>POST</code> request and return the result.
   * 
   * @param url
   *          URL to request
   * @param args
   *          arguments to accompany the request
   * @return the response of this request
   * @throws MalformedURLException
   *           <code>url</code> isn't a proper URL
   * @throws IOException
   *           there was an error in making the request
   */
  String postRequest(String url, Object[] args) throws MalformedURLException, IOException;
}
